<template>
  <div>
    <div class="app-container">
      <div>
        <mt-field
          v-model="mobile"
          label="手机号"
          placeholder="请输入手机号"
          type="tel"
        />

        <SmsCode
          v-model="verifyCode"
          :mobile="mobile"
          label=""
          placeholder="输入验证码"
          @click="onClickSmsCode"
        />

        <mt-button
          align="center"
          class="el-icon-plus"
          type="primary"
          @click.native="handleSmsLogin"
        >
          登录
        </mt-button>
        {{ verifyCode2 }}
      </div>
    </div>
  </div>
</template>

<script>
import loginMixin from './loginMixin'

import SmsCode from '@/components3/Field/SmsCode'
import SmsMixin from '@/mixins/sms'

export default {
  name: 'AppLogin',
  components: { SmsCode },
  directives: {},
  filters: {},
  mixins: [SmsMixin, loginMixin],
  props: {},

  data() {
    return {}
  },
  computed: {},
  async created() {},

  methods: {
    async handleSmsLogin() {
      console.log('xxx,handleSmsLogin')
      return this._handleLogin('user/smsLogin', {
        mobile: this.mobile,
        code: this.verifyCode
      })
    },

    onClickSmsCode() {
      console.log('xxx,onClickSmsCode')
      this.sendSms()
    }
  }
}
</script>

<style type="text/css"></style>
